package com.cn.mapper.dao.db1.admin;


import com.cn.bean.pojo.bc.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface AdminUserDao {
    List<User> selectAdminUser(@Param("username") String username, @Param("name") String name, @Param("limit") int limit, @Param("page") int page);

    List<User> selectUserId(@Param("userId") int userId);

    int insertAdminUser(@Param("username") String username, @Param("password") String password, @Param("status") int status,
                        @Param("name") String name, @Param("bmmc") String bmmc, @Param("sszz") String sszz,
                        @Param("departmentId") int departmentId, @Param("userId") int userId,
                        @Param("register_time") String register_time);

    int updateAdminUser(@Param("username") String username, @Param("password") String password, @Param("status") int status,
                        @Param("name") String name, @Param("bmmc") String bmmc, @Param("sszz") String sszz,
                        @Param("departmentId") int departmentId, @Param("userId") int userId,
                        @Param("update_time") String update_time);

    int getAutoId();

    int repeatUsername(@Param("username") String username);

    int deleteAdminUser(@Param("userId") int userId);

    int deleteAdminUserRole(@Param("userId") int userId);

    int InsertAdminUserRole(@Param("userId") int userId,@Param("roleId") int roleId);

    int upUserPassWord(@Param("username")String username,@Param("password")String password);
}


